home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The PC-SIG Library 10
/
The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso
/
PC_SIGCD
/
04
/
4
/
DISK0442.ZIP
/
CK.DOC
next >
Wrap
Text File
|
1990-02-12
|
45KB
|
229 lines
COMMA \ PLIPUNCH Y SRCPUNCH Y TITLE RODGERS ANCESTOR PROCESSING
C BUILD, CORRELATE ANCESTORS TREES\\
\C MAIN PROGRAM%---%>END\\
\C SUBROUTINES\;
C MAIN PROGRAM%---%>END\\
\C DECLARATIONS"3\\
\>IMOM=1\\
\>IPOP=2\\
\>ILEFT=3\\
\>IRIGHT=4\\
\>CALL INIT(I)\\
\C READ INPUT DATA AND BUILD LEXICAL AND ANCESTOR TREES\\
\C SCAN FOR ANCESTOR SETS AND MARK THEM\\
\C>WRITE(6,999)%(ID(I),(MATRIX(I,J),J=1,4),MARK%(I,1),MARK(I,2),\\
\C><I=1,IMAX)\\
\C 999>FORMAT(' ',A8,4I6,2L3)\\
\C SCAN THE MARK VECTORS AND OUTPUT COUNTS\\
\>STOP\;
C DECLARATIONS"3\\
\C UP TO 1200 STRAINS, UP TO 80 GENERATIONS DEPTH\;
C UP TO 1200 STRAINS, UP TO 80 GENERATIONS DEPTH\\
\>CHARACTER*8 %ID(1200),MOMID,POPID,IDONE,IDTWO,IDS\\
\C INTEGERS\\
\>LOGICAL*1 %MARK(1200,20),NEW/.FALSE./\\
\C CONSTANTS\\
\>COMMON ID,MATRIX,MARK,IMOM,IPOP,ILEFT,IRIGHT\;
C INTEGERS\\
\>INTEGER*2 COUNT,HI/1/,I/1/,J/1/,\\
\><MAX,IMARK,LOC,SP/1/,S(80),RP\\
\>INTEGER*2 MATRIX(1200,4)\;
C CONSTANTS\\
\>INTEGER*2 IMOM,IPOP,ILEFT,IRIGHT\;
C READ INPUT DATA AND BUILD LEXICAL AND ANCESTOR TREES\\
\>READ(5,15)%ID(I),MOMID,POPID\\
\C DO WHILE ID(I) NOT ASTERISKS%---%90>CONTINUE\\
\>IMAX=I-1\;
>READ(5,15)%ID(I),MOMID,POPID\\
\15>FORMAT(3A8)\;
C DO WHILE ID(I) NOT ASTERISKS%---%90>CONTINUE\\
\25>IF(ID(I).EQ.'********')GOTO 90%---%>GOTO 25\;
25>IF(ID(I).EQ.'********')GOTO 90%---%>GOTO 25\\
\>IF(NEW)CALL INIT(I)\\
\>IDS=MOMID\\
\>DO 60 J=IMOM,IPOP%---%60>CONTINUE\\
\>I=I+1\\
\>READ(5,15)%ID(I),MOMID,POPID\\
\>CALL FIND%(ID(I),NEW,LOC)%---%85>CONTINUE\;
>DO 60 J=IMOM,IPOP%---%60>CONTINUE\\
\>CALL FIND%(IDS,NEW,LOC)%---%50>CONTINUE\\
\>IDS=POPID\;
>CALL FIND%(ID(I),NEW,LOC)%---%85>CONTINUE\\
\C IF NEW%---%86>CONTINUE\\
\C ELSE"45\;
C IF NEW%---%86>CONTINUE\\
\>IF(.NOT.NEW)GOTO 86\\
\>HI=I\\
\>CALL PLACEM%(ID(I),I,LOC)\\
\>GOTO 85\;
C ELSE"45\\
\>HI=LOC\\
\>I=I-1\;
>CALL FIND%(IDS,NEW,LOC)%---%50>CONTINUE\\
\C IF .NOT.NEW%---%40>CONTINUE\-XOR-\
\C ELSE"50\;
C IF .NOT.NEW%---%40>CONTINUE\\
\>IF(NEW)GOTO 40\\
\>MATRIX(HI,J)=LOC\\
\>GOTO 50\;
C ELSE"50\\
\>I=I+1\\
\>ID(I)=IDS\\
\>CALL INIT(I)\\
\>MATRIX(HI,J)=I\\
\>CALL PLACEM%(IDS,I,LOC)\;
C SCAN FOR ANCESTOR SETS AND MARK THEM\\
\>READ(5,115,end=110) ID(IMAX+I),I=1,19%---%110>continue\\
\>J=0\\
\C MARK EACH PARENT SET IN TURN\\
\C DO WHILE ID(IMAX+J+1).NOT.STARS%---%410>CONTINUE\\
\>JMAX=J\\
\>DO 510 I=1,IMAX%---%510>CONTINUE\;
>READ(5,115,end=110) ID(IMAX+I),I=1,19%---%110>continue\\
\115>FORMAT(19A8)\;
>DO 510 I=1,IMAX%---%510>CONTINUE\\
\>IF(MARK%(RP,20))\\
\><WRITE(7,375) ID(RP),ID(MATRIX(RP,IMOM)),ID(MATRIX(RP,IPOP))\;
C DO WHILE ID(IMAX+J+1).NOT.STARS%---%410>CONTINUE\\
\>IF(ID(IMAX+J+1).EQ.'********') GOTO 410\\
\>J=J+1\\
\C TRAVERSE ANCESTOR TREE AND MARK ALL INDIVIDUALS REACHED\\
\>IDS=ID(IMAX+J)\\
\>SP=1\\
\>WRITE(6,180) I\\
\>CALL FIND(IDS,NEW,LOC)\\
\>S(SP)=LOC\\
\C IF(NEW)%---%299>CONTINUE\\
\C DO WHILE SP>0%---%400>CONTINUE\;
C IF(NEW)%---%299>CONTINUE\\
\>WRITE(6,298) I\\
\298>FORMAT(' ',A8,' NOT FOUND IN INPUT SET.')\\
\>GOTO 400\;
>WRITE(6,180) I\\
\180>FORMAT%(' DEPTH-FIRST ANCESTOR TREE TRAVERSAL - ITEM',I3,'.')\;
C SCAN THE MARK VECTORS AND OUTPUT COUNTS\\
\>DO 195 I=1,JMAX\\
\195>S(I)=0\\
\>DO 200 I=1,IMAX%---%200>CONTINUE\\
\>WRITE(6,280)%(I,S(I)), I=1,JMAX\;
>WRITE(6,280)%(I,S(I)), I=1,JMAX\\
\280>FORMAT%(' # OF OCCURENCES OF A PROGENITOR WITH N DESCENDANTS',\;
280>FORMAT%(' # OF OCCURENCES OF A PROGENITOR WITH N DESCENDANTS',\\
\><' IN THE REQUESTED SET AS N : #'/\\
\><19(I2,':',13)\;
>DO 200 I=1,IMAX%---%200>CONTINUE\\
\>COUNT=0\\
\>DO 210 J=1,JMAX%---%210>CONTINUE\\
\>S(COUNT)=S(COUNT)+1\;
>DO 210 J=1,JMAX%---%210>CONTINUE\\
\>IF(MARK(I,J)) COUNT=COUNT+1\;
C SUBROUTINES\\
\>SUBROUTINE INIT(I)%---%>END\\
\>SUBROUTINE FIND(IDS,NEW,LOC)%---%>END\\
\>SUBROUTINE PLACEM(IDS,I,ORP)%---%>END\;
>SUBROUTINE INIT(I)%---%>END\\
\C INIT NEW MATRIX ELEMENT\;
C INIT NEW MATRIX ELEMENT\\
\>CHARACTER*8 %ID(1200)\\
\>INTEGER*2 MATRIX(1200,4),I\\
\>INTEGER*2 IMOM,IPOP,ILEFT,IRIGHT\\
\>LOGICAL*1 %MARK(1200,2000)\\
\>COMMON ID,MATRIX,MARK,IMOM,IPOP,ILEFT,IRIGHT\\
\C ACTUAL VALUES INITIALIZATION\;
C ACTUAL VALUES INITIALIZATION\\
\>DO 600 J=1,20\\
\600>MARK(I,J)=.FALSE.\\
\>MATRIX(I,ILEFT)=0\\
\>MATRIX(I,IRIGHT)=0\\
\>MATRIX(I,IPOP)=0\\
\>MATRIX(I,IMOM)=0\\
\>RETURN\;
C DO WHILE SP>0%---%400>CONTINUE\\
\300>IF(SP.EQ.0)GOTO 400%---%>GOTO 300\\
\370>FORMAT(' ',3A8)\\
\375>FORMAT(3A8)\;
300>IF(SP.EQ.0)GOTO 400%---%>GOTO 300\\
\>RP=S(SP)\\
\>SP=SP-1\\
\C IF NEW TERRITORY AND IMOM NE 0 THEN%---%350>CONTINUE\\
\C IF NEW TERRITORY AND IPOP NE 0 THEN%---%360>CONTINUE\\
\>MARK(RP,I)=%.TRUE.\\
\>MARK(RP,20)=%.TRUE.\;
C IF NEW TERRITORY AND IMOM NE 0 THEN%---%350>CONTINUE\\
\>IF(MATRIX(RP,IMOM).EQ.0.OR.MARK(RP,I))GOTO 350\\
\>WRITE(6,370) ID(RP),ID(MATRIX(RP,IMOM)),ID(MATRIX(RP,IPOP))\\
\>SP=SP+1\\
\>S(SP)=MATRIX%(RP,IMOM)\;
C IF NEW TERRITORY AND IPOP NE 0 THEN%---%360>CONTINUE\\
\>IF(MATRIX(RP,IPOP).EQ.0.OR.MARK(RP,I))GOTO 360\\
\>SP=SP+1\\
\>S(SP)=MATRIX%(RP,IPOP)\;
>SUBROUTINE PLACEM(IDS,I,ORP)%---%>END\\
\C PUT INDIVIDUAL IN BINARY TREE ACCORDING TO ITS LEXICAL VALUE\\
\C DECLARATIONS"161\\
\>IF(IDS.LT.%ID(ORP))MATRIX%(ORP,ILEFT)=I\\
\>IF(IDS.GT.%ID(ORP))MATRIX%(ORP,IRIGHT)=I\\
\>RETURN\;
C DECLARATIONS"161\\
\>CHARACTER*8 IDS,ID(1200)\\
\>INTEGER*2 MATRIX(1200,4),ORP,I\\
\>INTEGER*2 IMOM,IPOP,ILEFT,IRIGHT\\
\>LOGICAL*1 %MARK(1200,2000)\\
\>COMMON ID,MATRIX,MARK,IMOM,IPOP,ILEFT,IRIGHT\;
>SUBROUTINE FIND(IDS,NEW,LOC)%---%>END\\
\C LOCATE THE RECORD NUMBER OF THE INDIVIDUAL PASSED AS ARGUMENT\\
\C DECLARATIONS"154\\
\>NEW=.FALSE.\\
\>RP=1\\
\C DO WHILE RP.NE.0%---%890>CONTINUE\\
\>NEW=.TRUE.\\
\>LOC=ORP\\
\>RETURN\;
C DECLARATIONS"154\\
\>CHARACTER*8 IDS,ID(1200)\\
\>INTEGER*2 MATRIX(1200,4),LOC,RP,ORP\\
\>INTEGER*2 IMOM,IPOP,ILEFT,IRIGHT\\
\>LOGICAL*1 NEW,MARK(1200,2000)\\
\>COMMON ID,MATRIX,MARK,IMOM,IPOP,ILEFT,IRIGHT\;
C DO WHILE RP.NE.0%---%890>CONTINUE\\
\800>IF(RP.EQ.0)GOTO 890%---%>GOTO 800\;
800>IF(RP.EQ.0)GOTO 890%---%>GOTO 800\\
\>ORP=RP\\
\C CASE IDS VS. ID(RP)%---%880>CONTINUE\;
C CASE IDS VS. ID(RP)%---%880>CONTINUE\\
\C IF IDS.LT.%ID(RP) GO LEFT%---%810>CONTINUE\-XOR-\
\C IF IDS.GT.%ID(RP) GO RIGHT%---%820>CONTINUE\-XOR-\
\C FOUND SOUGHT ITEM, RETURN HIS SPOT\;
C IF IDS.LT.ID(RP) GO LEFT%---%810>CONTINUE\\
\>IF(IDS.GE.%ID(RP))GOTO 810\\
\>RP=MATRIX(RP,ILEFT)\\
\>GOTO 880\;
C IF IDS.GT.ID(RP) GO RIGHT%---%820>CONTINUE\\
\>IF(IDS.LE.%ID(RP))GOTO 820\\
\>RP=MATRIX(RP,IRIGHT)\\
\>GOTO 880\;
C FOUND SOUGHT ITEM, RETURN HIS SPOT\\
\>LOC=RP\\
\>RETURN\;
ENDWARNIERDIAGRAM
c@e`gÇiák└mαo q s@u`wÇyá{└}α ü â@à`çÇëáï└ìα æ ô@ ò` ùÇ Öá ¢└ ¥α ƒ
í
ú@
Ñ`
ºÇ
⌐á
½└
¡α
▒ │@ o╖Ç╣á╗└╜α┐ ┴ ├@┼`╟Ç╔á╦└═α╧ ╤ ╙@╒`╫Ç┘á█└▌α▀ ß π@σ`τÇΘ≡ δ≡ ∩∩ /≤@⌡`≈Ç∙á√└²α !Aaü í┴ß!Aaüí┴ß!!#A%a'ü)í+┴-ß/1!3A5a ÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ECHO OFF
CLS
TYPE GO.TXT
ECHO ON
└α ! #@%`'Ç »+└-α/ 1 3@5`7Ç9á;└=α? A C@E`GÇIáK└MαO Q S@U`WÇYá[└]α_ a c@e`gÇiák└mαo q s@u`wÇyá{└}α ü â@à`çÇëáï└ìαÅ æ ô@ ò` ùÇ Öá ¢└ ¥α ƒ
í
ú@
Ñ`
ºÇ
⌐á
½└
¡α
» ▒ O╡`╖Ç╣á╗└╜α┐ ┴ ├@┼`╟Ç╔á╦└═α╧ ╤ ╙@╒`╫Ç┘á█└▌α▀ ß π@σ` ÅΘáδ└φα∩ ± ≤@⌡`≈Ç∙á√└²α !Aaü í┴ß!Aaüí┴ß!!#A%a'ü)í -ß/1!3± 5a7ü9± ;┴ ?± / ÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷